This invention relates to forming of a replica of a database in a database system.
As described in chapter 23, pp. 624 and pp. 630 of “An Introduction to Database Systems, Volume I, Fifth Edition” by C. J. Date, the replica of database means a replica that should be identical with the master database in the data content and management method. A replica is prepared for avoiding a risk of working interruption due to work distribution of data processing or due to a failure of a computer that stores the data. It is required that the data content is logically identical between the master database and the replica. In order to be identical, it is required to apply the same data update processing as applied to the master database also to the replica to thereby maintain the same content. Heretofore, in order to maintain the same content, the same data update processing as applied to the master database is applied to the replica in the order of the occurrence of the update processing to thereby reflect the update on the replica.
A conventional replica forming process flow and the data content of update information to be used are shown in FIG. 6. When replica forming process is started (401), for example, the update information used for updating the stored master database called as journal or update log is read in the order of occurrence successively (402). The read update information is edited so as to be capable of reflecting on the replica side database (syntax or parameter format used to update the database), and then reflected on the replica side database (403). Whether there is any subsequent update information or not is determined (404), and if the result is YES, then the process is repeated. When the update information reaches to the end of the stored update information, the sequence is brought to an end (405). The data content of the update information contains the update table name 501 that is the table name to be updated in the database, the type of update 502, and the record information 503 for indicating the updated record content. The table name is only an example, and the data element such as table, item, and record is the data content of the update information. The order of data of the update information data content of FIG. 6 is the same as the order of update that has occurred in the master side database, and the update process of the replica occurs in the same order.
In the conventional art, the update process to be applied involves various tables (in other words, various data are mixed). Because update of the replica is applied in the same order as applied actually in updating of the data even though usage and necessity of the data are different respectively, it can occur that the necessary data is not reflected until all the stored update information is updated completely. For example, because update of another table is mixed during update of inventory table when the updated data of the inventory table is wanted in FIG. 6, it is not guaranteed that update of the inventory table has been completed until reflection of the update data is completed for all the update data. Therefore, it is a problem that it takes a long time to get the updated data that is required.